var express = require("express");
var router = express.Router();
const OpinionController = require("../controller/OpinionController");

//挂载路由

router
  .route("/")
  .post(OpinionController.addOpinion)
  .get(OpinionController.getOpinion);

router
  .route("/:id")
  .patch(OpinionController.updateOpinion)
  .get(OpinionController.getOpinionById);

module.exports = router;
